package com.atguigu.gulimall.order.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.feign.fallback.ProductFeignServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 商品远程服务
 *
 * @author xiaoping
 * @create 2020/7/6 15:06
 * @since 1.0.0
 */
@FeignClient(value = "gulimall-product",fallback = ProductFeignServiceFallBack.class)
public interface ProductFeignService {

    /**
     *  通过skuId获取spu信息
     * @return
     */
    @GetMapping("/product/spuinfo/skuId/{id}")
    R getSpuInfoBySkuId(@PathVariable("id") Long skuId);

}
